package RentCar;

import java.util.Scanner;

public class Bus extends Vehicle{
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Bus() {
        ;
    }

    public Bus(String vehicleId, String brand, int perRent, String type) {
        super(vehicleId, brand, perRent);
        this.type = type;
    }

    @Override
    public float calRent(int days) {
        if(days>=150){
            return super.calRent(days)*0.6f;
        }
        else if(days>=30){
            return super.calRent(days)*0.7f;
        }
        else if(days>=7){
            return super.calRent(days)*0.8f;
        }
        else if(days>=3){
            return super.calRent(days)*0.9f;
        }
        else{
            return super.calRent(days);
        }
    }
    @Override
    public void leaseOutFlow() {
        System.out.println("1.金杯  2.金龙");
        System.out.print("请选择你要租贷的轿车品牌:");
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
        if(a==1){
            this.type="金杯";
            setBrand("16");
            setPerRent(800);
            setVehicleId("京6566754");
        }
        else{
            this.type="金龙";
            setBrand("34");
            setPerRent(1500);
            System.out.println("京9696996");
        }
        System.out.print("请输入客车的座位数:");
        int b=scanner.nextInt();
        System.out.println("nb");
    }
}
